package View;

import java.util.ArrayList;

import BO.Category;

public class CategoryView {
	private int nr;
	private String name;
	private int parent;
	private ArrayList<CategoryView> child;
	
	public CategoryView(Category category){
		nr = category.getNr();
		name = category.getName();
		parent = category.getParent();
		child = new ArrayList<CategoryView>();
		ArrayList<Category> list = category.getChild();
		for(int i = 0; i < list.size(); i++){
			child.add(new CategoryView(list.get(i)));
		}
	}

	public int getNr() {
		return nr;
	}

	public String getName() {
		return name;
	}

	public int getParent() {
		return parent;
	}

	public ArrayList<CategoryView> getChild() {
		return child;
	}
	

}
